﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteAdmin.Master" AutoEventWireup="true" CodeBehind="admin.aspx.cs" Inherits="Com.Qkds.Erp.WebUi.admin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="row">
        <div class="col-2">
            <div class="accordion" id="accordionExample">
                <div class="card">
                    <div class="card-header" id="headingOne">
                        <h2 class="mb-0">
                            <asp:LinkButton ID="btnAdmin" class="btn btn-link btn-block text-left" runat="server">用户管理</asp:LinkButton>
                        </h2>
                    </div>
                </div>
                <div class="card">
                    <div class="card-header" id="headingTwo">
                        <h2 class="mb-0">
                            <asp:LinkButton ID="btnrole" class="btn btn-link btn-block text-left" runat="server" OnClick="btnrole_Click">角色管理</asp:LinkButton>
                        </h2>
                    </div>
                </div>
                <div class="card">
                    <div class="card-header" id="headingThree">
                        <h2 class="mb-0">

                            <asp:LinkButton ID="btnQx" class="btn btn-link btn-block text-left collapsed" runat="server" OnClick="btnQx_Click">权限管理</asp:LinkButton>

                        </h2>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-10">
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="Home.aspx">首页</a></li>
                    <li class="breadcrumb-item active" aria-current="page">用户列表</li>
                </ol>
            </nav>
            <div class="btn-toolbar justify-content-between mb-3" role="toolbar" aria-label="Toolbar with button groups">
                <div class="btn-group" role="group" aria-label="First group">
                    <a href="AdminEdit.aspx" class="btn btn-primary">添加</a>
                    <button type="button" class="btn btn-primary">导入</button>
                    <button type="button" class="btn btn-primary">导出</button>
                    <button type="button" class="btn btn-danger">批量删除</button>
                </div>
                <div class="input-group">
                    <input type="text" class="form-control" id="sev" runat="server" aria-label="Recipient's username" aria-describedby="button-addon2">
                    <div class="input-group-append">
                        <asp:LinkButton ID="sel" class="btn btn-outline-secondary" runat="server" OnClick="sel_Click">查询</asp:LinkButton>
                    </div>
                </div>
            </div>
            <table class="table table-bordered">
                <thead>
                    <tr>
                        <th scope="col">编号</th>
                        <th scope="col">账户</th>
                        <th scope="col">密码</th>
                        <th scope="col">角色</th>
                        <th scope="col">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <asp:Repeater ID="rpAdmin" runat="server" OnItemCommand="rpAdmin_ItemCommand">
                        <ItemTemplate>
                            <tr>
                                <th scope="row"><%# Eval("ID") %></th>
                                <td><%# Eval("Name") %></td>
                                <td><%# Eval("Pwd") %></td>
                                <td><%# Eval("roleName") %></td>
                                <td>
                                    <a href='AdminEdit.aspx?id=<%# Eval("ID") %>' class="btn btn-primary">修改</a>
                                    <asp:LinkButton runat="server" Class="btn btn-danger"
                                        CommandName="del" CommandArgument='<%# Eval("ID") %>'
                                        OnClientClick="return confirm('确认删除吗？')">删除</asp:LinkButton>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>
            <nav aria-label="Page navigation example">
                <ul class="pagination justify-content-center">
                    <li class="page-item ">
                        <asp:LinkButton ID="btnPageFirst" class="page-link" runat="server" OnClick="btnPageFirst_Click">首页</asp:LinkButton>
                    </li>
                    <li class="page-item">
                        <asp:LinkButton ID="btnPagePre" class="page-link" runat="server" OnClick="btnPagePre_Click">上页</asp:LinkButton>
                    </li>
                    <li class="page-item"><a class="page-link" href="#"><%= PageIndex %> </a></li>
                    <li class="page-item">
                        <asp:LinkButton ID="btnPageNext" class="page-link" runat="server" OnClick="btnPageNext_Click">下页</asp:LinkButton>
                    </li>
                    <li class="page-item">
                        <asp:LinkButton ID="btnPageLast" class="page-link" runat="server" OnClick="btnPageLast_Click">末页</asp:LinkButton>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</asp:Content>
